/*
 * Scaffold Application Framework
 *
 * Copyright (c) 2010 Sii Sp. z o.o. All rights reserved.
 */
package com.rstrulak.constant;

import org.hibernate.type.CharBooleanType;

/**
 * Custom type mapping char(1) [Y/N] to boolean.
 * 
 * @author Jakub Ciechan
 * @version 1.0
 */
public class TrueFalseType extends CharBooleanType {

    /**
     * Generated id for serialization purposes.
     */
    private static final long serialVersionUID = -6304590519223087482L;

    /**
     * String representation of a <tt>false</tt> value.
     */
    @Override
    protected String getFalseString() {
        return "N";
    }

    /**
     * String representation of a <tt>true</tt> value.
     */
    @Override
    protected String getTrueString() {
        return "Y";
    }
}
